import { POP, NEW, SELL } from "./const";

import backTop from "@/components/content/backTop/BackTop"
export const backTopMixin = {
  data() {
    return {
      isshow: false,
    }
  },
  components: {
    backTop
  },
  methods: {
    backClick() {
      this.$refs.scroll && this.$refs.scroll.scrollTo(0, 0);
    },
  }
}


export const tabControlMixin = {
  data: function() {
    return {
      currentType: POP
    }
  },
  methods: {
    tabClick(index) {
      switch (index) {
        case 0:
          this.currentType = POP
          break
        case 1:
          this.currentType = NEW
          break
        case 2:
          this.currentType = SELL
          break
      }
      // console.log(this.currentType);
    }
  }
}